package com.zelin.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/hello")
public class HelloController {
    @RequestMapping("/list")
    public ModelAndView list(){
        // 真实的物理视图：/WEB-INF/jsp/hello.jsp
        //等同于req.setAttribute("str","welcome....");
        return new ModelAndView("hello","str","welcome to myprojects");
    }
}
